<template>
    <h3>数组变化侦听</h3>
    <button @click="addlist">添加数据</button>
    <div>
        <li v-for="(item,index) in names" :key="index">{{item}}</li>
    </div>

</template>
<script>
    export default{
        data(){
            return{
                names:['1','2','3']
            }
        },
        methods:{
            addlist(){
                // this.names.push("4")
                this.names = this.names.concat('44')

            }
        }
    }
</script>